﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:edc="clr-namespace:Microsoft.Expression.Controls;assembly=Microsoft.Expression.Drawing" xmlns:WeiTalk="clr-namespace:WeiTalk" x:Name="userControl" x:Class="WeiTalk.Controls.WeiBoControl"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
 Background="Black" Loaded="LayoutRoot_Loaded" MouseLeftButtonUp="Border_MouseLeftButtonUp" MouseLeftButtonDown="Border_MouseLeftButtonDown">
	<UserControl.Resources>
		<Storyboard x:Name="sbSelected">
			<DoubleAnimation Duration="0:0:0.5" To="90" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="userControl" d:IsOptimized="True"/>
			<DoubleAnimation Duration="0:0:0.5" To="0" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.CenterOfRotationX)" Storyboard.TargetName="userControl" d:IsOptimized="True"/>
		</Storyboard>
	</UserControl.Resources>
	<UserControl.Projection>
		<PlaneProjection/>
	</UserControl.Projection>

    <Border BorderThickness="5"  CornerRadius="10" Background="#FFA14E08" Width="450" >
        <Grid x:Name="LayoutRoot"  >
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="auto"/>
                <ColumnDefinition  Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="1"/>
            </Grid.RowDefinitions>
            <StackPanel Orientation="Horizontal" Grid.Column="0">
                <TextBlock  TextWrapping="Wrap" Text="UserName" HorizontalAlignment="Left"   Margin="5" x:Name="tbUserName"/>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Grid.Column="1" HorizontalAlignment="Right">
                <TextBlock x:Name="tbCreateAt" TextWrapping="Wrap" Text="CreatedAt"  Margin="5" VerticalAlignment="Top" HorizontalAlignment="Right" />
            </StackPanel>
            <Grid Grid.Row="1" Grid.ColumnSpan="2">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="65"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="auto"/>
                    <RowDefinition Height="auto"/>
                </Grid.RowDefinitions>
                <Image Width="50" Height="50" VerticalAlignment="Top" x:Name="headImg" Grid.Column="0" HorizontalAlignment="Left" Margin="7,0,0,0" Stretch="UniformToFill" Source="ProfileImageUrl"/>
                <StackPanel Orientation="Vertical" Grid.Column="1" HorizontalAlignment="Left" x:Name="spContent">
                    <TextBlock x:Name="tbContent" TextWrapping="Wrap" Text="Text" Margin="15,2,5,10" VerticalAlignment="Top"  HorizontalAlignment="Left" Foreground="#FFFDFDFD" />
                </StackPanel>
                <Image x:Name="imgWeiBo" Width="150" Height="150" Grid.Row="1" Grid.ColumnSpan="2" HorizontalAlignment="Center" Margin="0,5" Stretch="None" />
            </Grid>
            <StackPanel Grid.Row="2" Grid.ColumnSpan="2" x:Name="spRetweeted" >
                <Border BorderThickness="3,8,5,8" CornerRadius="7" Margin="60,0,0,0" Background="#B2874014">
                    <Grid x:Name="RetweetedGrid" Margin="5,2">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="auto"/>
                            <RowDefinition Height="*"/>
                            <RowDefinition Height="*"/>
                            <RowDefinition Height="auto"/>
                        </Grid.RowDefinitions>
                        <StackPanel Orientation="Horizontal" Grid.Column="0" Grid.ColumnSpan="2">
                            <TextBlock  TextWrapping="Wrap" Text="RetweetedUserName" HorizontalAlignment="Left"   Margin="5" x:Name="tbRetweetedUserName" FontSize="18.667" Foreground="#FFBEB1B1" />
                        </StackPanel>
                        <StackPanel Orientation="Horizontal" Grid.Column="1" HorizontalAlignment="Right">
                            <TextBlock x:Name="tbRetweetedCreateAt" TextWrapping="Wrap" Text="RetweetedCreateAt"  Margin="5" VerticalAlignment="Top" HorizontalAlignment="Right" FontSize="18.667" Foreground="#FFBEB1B1" />
                        </StackPanel>

                        <StackPanel Orientation="Vertical" HorizontalAlignment="Left" Grid.Row="1">
                            <TextBlock  TextWrapping="Wrap" Text="RetweetedContent" VerticalAlignment="Top"   HorizontalAlignment="Left" x:Name="tbRetweetedContent" Margin="15,2,5,0" Foreground="#FFBEB1B1" />
                        </StackPanel>
                        <Image x:Name="imgRetweetedWeiBo" Width="120" Height="120" Grid.Row="2"  HorizontalAlignment="Center" Margin="0,5" Stretch="None"/>
                        <StackPanel Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="2" Orientation="Horizontal">
                            <TextBlock  TextWrapping="Wrap" Text="RetweetedSource" HorizontalAlignment="Left"   Margin="10,10,5,5" x:Name="tbRetweetedSource"  Foreground="#FFC49472" FontSize="16"/>
                        </StackPanel>
                        <StackPanel  VerticalAlignment="Bottom" HorizontalAlignment="Right" Orientation="Horizontal" Grid.Row="3" Grid.ColumnSpan="2" >
                            <TextBlock  TextWrapping="Wrap"   HorizontalAlignment="Right" Margin="10,10,5,5" x:Name="tbRetweetedRepostsCount"  Foreground="#FFC49472" FontSize="13.333" />
                            <TextBlock  TextWrapping="Wrap" Text="RetweetedCommentCount" HorizontalAlignment="Right"   Margin="20,5,5,5" x:Name="tbRetweetedCommentsCount"  Foreground="#FFC49472" FontSize="13.333" VerticalAlignment="Bottom"/>
                        </StackPanel>
                    </Grid>
                </Border>
            </StackPanel>

            <TextBlock  TextWrapping="Wrap" Text="Source" HorizontalAlignment="Left"  Margin="20,5,5,5" x:Name="tbSource"  Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="2" Foreground="#FFC49472" FontSize="16"/>
            <StackPanel Grid.Column="1"  Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Right">
                <TextBlock  TextWrapping="Wrap"  HorizontalAlignment="Right"   Margin="20,5,5,5" x:Name="tbRepostsCount" Foreground="#FFC49472" FontSize="13.333" VerticalAlignment="Bottom"/>

                <TextBlock  TextWrapping="Wrap"  HorizontalAlignment="Right"   Margin="20,5,5,5" x:Name="tbCommentsCount"  Foreground="#FFC49472" FontSize="13.333" VerticalAlignment="Bottom"/>
            </StackPanel>
        </Grid>
    </Border>

</UserControl>
